package javaFeatures.javaPolymorphism;

public class Test {
public static void main(String[] args) {
	//定义父类数组
	Wine[] wines = new Wine[2];
	//定义两个子类
	JianNanChun jnc = new JianNanChun();
	JiuGuiJiu jgj = new JiuGuiJiu();
	//父类引用子类对象
	wines[0] = jnc;
	wines[1] = jgj;
	for(Wine wine :wines){
		System.out.println(wine.toString()+"-------------"+wine.drink());
	}
}
}
